module.exports = {
  publicPath: '/',
  transpileDependencies: ['element-ui/packages'],
  productionSourceMap: false,
  // 关闭eslint
  lintOnSave: true,
  css: {
    loaderOptions: {
      scss: {
        prependData: [
          '@import "~@/assets/css/variables.scss";',
          // `@import "~@/plugins/element-ui/theme.${process.env.THEME}.scss";`,
        ].join(''),
      },
    },
  },
  devServer: {
    open: false,
    port: 8081,
    proxy: {
      '/api': {
        target: 'http://localhost:18080', //http://172.16.6.28:18080
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/api': '',
        },
      },
      '/public': {
        target: `http://localhost:18080`, //http://172.16.6.28:18080
        ws: true,
        changeOrigin: true,
      },
      '/ws': {
        target: `http://localhost:18080`, //http://172.16.6.28:18080
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '/ws': '',
        },
      },
    },
  },
};
